<html>
<!-- Mirrored from bos.asmhackers.net/docs/vga_without_bios/docs/groups.htm by HTTrack Website Copier/3.x [XR&CO'2013], Tue, 07 Oct 2014 11:24:45 GMT -->
<head><meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"><title>Google Search:  </title><style><!--
body,td,div,.p,a{font-family:arial,sans-serif }
div,td{color:#000}
.f,.fl:link{color:#6f6f6f}
a:link,.w,a.w:link,.w a:link{color:#00c}
a:visited,.fl:visited{color:#551a8b}
a:active,.fl:active{color:#f00}
.t a:link,.t a:active,.t a:visited,.t{color:#000}
.t{background-color:#fff4c2}
.k{background-color:#fc3}
.j{width:34em}
.h{color:#da1}
.i,.i:link{color:#a90a08}
.a,.a:link{color:#008000}
.z{display:none}
div.n {margin-top: 1ex}
.n a{font-size:10pt; color:#000}
.n .i{font-size:10pt; font-weight:bold}
.q a:visited,.q a:link,.q a:active,.q {color: #00c; }
.b{font-size: 12pt; color:#00c; font-weight:bold}
.ch{cursor:pointer;cursor:hand}
//-->
</style>
<script>
<!--
function ss(w){window.status=w;return true;}
function cs(){window.status='';}
function ga(o,e){if (document.getElementById){a=o.id.substring(1); p = "";r = "";g = e.target;if (g) { t = g.id;f = g.parentNode;if (f) {p = f.id;h = f.parentNode;if (h) r = h.id;}} else{h = e.srcElement;f = h.parentNode;if (f) p = f.id;t = h.id;}if (t==a || p==a || r==a) return true;location.href=document.getElementById(a).href}}
//-->
</script>
</head><body bgcolor=#ffffff onLoad="document.gs.reset()" topmargin=2 marginheight=2><table border=0 cellpadding=0 cellspacing=0><tr><td valign=top><a href=http://groups.google.ca/grphp?hl=en><img src=../../../intl/en_ALL/images/groups_res.html width=150 height=58 alt="Go to Google Groups Home" border=0 vspace=12></a></td><td>&nbsp;&nbsp;</td><td valign=top><table cellpadding=0 cellspacing=0 border=0><tr><td height=14 valign=bottom><script><!--
function qs(el) {if (window.RegExp && window.encodeURIComponent) {var qe=encodeURIComponent(document.gs.q.value);if (el.href.indexOf("q=")!=-1) {el.href=el.href.replace(new RegExp("q=[^&$]*"),"q="+qe);} else {el.href+="&q="+qe;}}return 1;}
// -->
</script><table border=0 cellpadding=4 cellspacing=0><tr><td class=q><font size=-1><a id=t0a class=q href="http://www.google.ca/search?hl=en&amp;lr=&amp;sa=N&amp;tab=gw" onClick="return qs(this);">Web</a>&nbsp;&nbsp;&nbsp;&nbsp;<a id=t1a class=q href="http://images.google.ca/images?hl=en&amp;lr=&amp;sa=N&amp;tab=gi" onClick="return qs(this);">Images</a>&nbsp;&nbsp;&nbsp;&nbsp;<font color=#000000><b>Groups</b></font>&nbsp;&nbsp;&nbsp;&nbsp;<a id=t4a class=q href="http://news.google.ca/news?hl=en&amp;lr=&amp;sa=N&amp;tab=gn" onClick="return qs(this);">News</a>&nbsp;&nbsp;&nbsp;&nbsp;<a id=t7a class=q href="http://local.google.ca/local?hl=en&amp;lr=&amp;sa=N&amp;tab=gl" onClick="return qs(this);">Local</a><sup><a href="http://local.google.ca/local?hl=en&amp;lr=&amp;sa=N&amp;tab=gl" style="text-decoration:none;" onclick="return qs(this);"><font color=red>New!</font></a></sup>&nbsp;&nbsp;&nbsp;&nbsp;</font><font size=-1><b><a href="http://bos.asmhackers.net/options/" class=q>more&nbsp;&raquo;</a></b></font></td></tr></table></td></tr><tr><td><table border=0 cellpadding=0 cellspacing=0><tr><td nowrap><form name=gs method=GET action=http://bos.asmhackers.net/groups><input type=hidden name=hl value="en"><input type=hidden name=lr value=""><input type=text name=q size=41 maxlength=2048 value=""><font size=-1> <input type=submit name="btnG" value="Search"><span id=hf></span></font></td><td nowrap><font size=-2>&nbsp;&nbsp;<a href=http://bos.asmhackers.net/advanced_group_search?hl=en&amp;lr=>Advanced&nbsp;Groups&nbsp;Search</a><br>&nbsp;&nbsp;<a href=http://bos.asmhackers.net/preferences?hl=en&amp;lr=>Preferences</a>&nbsp;&nbsp;&nbsp;&nbsp;</font></td></tr></table></td></tr></table><table cellpadding=0 cellspacing=0 border=0><tr><td><font size=-1></font></td></tr><tr><td height=7><img width=1 height=1 alt=""></td></tr></table></td></tr></form></table>
<style><!--
.fl:link{color:#7777CC}
-->
</style>
<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td bgcolor=#ffcc33><img width=1 height=1 alt=""></td></tr></table><table width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#fff4c2><tr><td bgcolor=#fff4c2 nowrap><font size=+1>&nbsp;<b>Groups</b></font>&nbsp;</td><td bgcolor=#fff4c2 align=right nowrap><font size=-1 color=>Viewing message &lt;3e2234ce.1638784@news.voyager.net&gt;&nbsp;</font></td></tr></table><table cellSpacing=0 cellPadding=0 width="100%" border=0><tr><td height=5><img alt="" width=1 height=1></td></tr></table><table cellSpacing=0 cellPadding=2 width="100%" border=0 bgcolor=#E0FFE3><tr><td class=ch id=taw0 onmouseover="ss('go to www.velocityscape.com')" onclick=ga(this,event) onmouseout=cs()><font size=-1>&nbsp;<a id=aw0 href=http://bos.asmhackers.net/url?sa=l&amp;q=http://www.velocityscape.com&amp;ai=Bx8PEfq8xQseME8-MFpj0sBr6s54JmLifjQHAjbcBwLgCEAEYASDgTigDQMAVSK05yAEB2gE5L2dyb3Vwcz9hc19xPSZhc191bXNnaWQ9M2UyMjM0Y2UuMTYzODc4NEBuZXdzLnZveWFnZXIubmV0&amp;num=1><b>Screen Scrape the Web</b></a>&nbsp;&#149;&nbsp;<font class=f size=-2>Scrape the Web to a Database/Excel&nbsp;Powerful, Flexible, Easy.</font>&nbsp;&#149;&nbsp;<font color=green size=-1>www.velocityscape.com</font></td><td rowspan=3 valign=top align=right><font size=-2 color=6f6f6f>Sponsored Links</font>&nbsp;<br></td></tr><tr><td class=ch id=taw1 onmouseover="ss('go to www.softio.com')" onclick=ga(this,event) onmouseout=cs()><font size=-1>&nbsp;<a id=aw1 href=http://bos.asmhackers.net/pagead/iclk?adurl=http://softio.com/lowprofile.htm&amp;sa=l&amp;ai=BZVFgfq8xQseME8-MFpj0sBqks50IoO-4lwHAjbcBsNQyEAIYAiDgTigDQMAVSIo5oAGPn8L_A8gBAdoBOS9ncm91cHM_YXNfcT0mYXNfdW1zZ2lkPTNlMjIzNGNlLjE2Mzg3ODRAbmV3cy52b3lhZ2VyLm5ldA&amp;num=2><b>PCI-X Parallel / Serial</b></a>&nbsp;&#149;&nbsp;<font class=f size=-2>For 32/64 Bit 3.3/5 volt slots in&nbsp;Win / Linux. We ship world-wide.</font>&nbsp;&#149;&nbsp;<font color=green size=-1>www.softio.com</font></td></tr><tr><td class=ch id=taw2 onmouseover="ss('go to www.kapowtech.com')" onclick=ga(this,event) onmouseout=cs()><font size=-1>&nbsp;<a id=aw2 href=http://bos.asmhackers.net/pagead/iclk?adurl=http://www.kapowtech.com/solutions_datacollection.htm%3Fgoogle%26keyword%3Dscreenscraping&amp;sa=l&amp;ai=BzPBNfq8xQseME8-MFpj0sBqRuYUFw7jHmAHAjbcBwO0aEAMYAyDgTigDQMAVSLE5oAGM1JH_A8gBAdoBOS9ncm91cHM_YXNfcT0mYXNfdW1zZ2lkPTNlMjIzNGNlLjE2Mzg3ODRAbmV3cy52b3lhZ2VyLm5ldA&amp;num=3><b>Screen Scraping</b></a>&nbsp;&#149;&nbsp;<font class=f size=-2>Why cut &amp; paste? Try RoboSuite&nbsp;for automated content migration.</font>&nbsp;&#149;&nbsp;<font color=green size=-1>www.kapowtech.com</font></td></tr></table><table cellSpacing=0 cellPadding=0 width="100%" border=0><tr><td height=5><img alt="" width=1 height=1></td></tr></table>
<table width=100% bgcolor=#e0e0e0 cellpadding=2 cellspacing=0 border=0><tr><td><font face=arial,sans-serif>

<table cellpadding=0 cellspacing=0 border=0 align=right><tr><td><font face=arial,sans-serif></font></td></tr></table>
From: <a href=http://bos.asmhackers.net/groups?hl=en&amp;lr=&amp;q=author:NoEmailAds%40execpc.com+ >Chris Giese</a> (<a href=mailto:NoEmailAds%40execpc.com>NoEmailAds@execpc.com</a>)<br>Subject: Re: VGA DAC programming <br><font face=arial,sans-serif><table cellpadding=0 cellspacing=0 border=0 align=right><tr><td>View: <a href=http://bos.asmhackers.net/groups?hl=en&amp;lr=&amp;threadm=3e2234ce.1638784%40news.voyager.net&amp;rnum=1&amp;prev=/groups%3Fas_q%3D%26as_umsgid%3D3e2234ce.1638784%40news.voyager.net >Complete Thread (16 articles)</a> </td></tr><tr><td align=right> <a href=http://bos.asmhackers.net/groups?selm=3e2234ce.1638784%40news.voyager.net&amp;output=gplain >Original Format</a></td></tr></table></font>
Newsgroups: <a href=http://bos.asmhackers.net/groups?hl=en&amp;lr=&amp;group=comp.os.msdos.djgpp >comp.os.msdos.djgpp</a><br>Date: 2003-01-12 19:41:55 PST <br></font></td></tr></table><pre>&quot;Joel_S&quot; &lt;jbs30000.news.invalid@web2news.net&gt; wrote:

<font color="#660066">&gt;Well, since I'm writting routines for screen mode 0x12 being able to
&gt;change the palettes of the 16 colors is necessary for properly diplaying
&gt;a bitmap file.  But I'm not to worried, the built in SCREEN commands in</font>

The 16 colors are processed by both the 256-color palette (the DAC)
and the 16-color palette in the first 16 registers of the Attribute
Controller. You can set the palette with code like this:

 int i, j;

 for(i = 0; i &lt; 16; i++) {
/* reset Attribute Controller (AC) flip-flop so 0x3C0 is AC address */
  (void)inportb(0x3DA);
/* set AC address = i. You must clear bit b5 here to modify the palettes.
Clearing this bit will also blank the display. */
  outportb(0x3C0, i);
/* read AC register #i
THIS is the index into the 256-color palette, not 'i' */
  j = inportb(0x3C1);
/* set the 256-color palette (DAC) entry. Only the bottom 6 bits of each
R, G, and B entry are significant, so we divide by 4. Change RED, GREEN,
and BLUE to whatever is appropriate for your code. */
  outportb(0x3C8, j);
  outportb(0x3C9, RED  [i] / 4);
  outportb(0x3C9, GREEN[i] / 4);
  outportb(0x3C9, BLUE [i] / 4);
<font color="#660066"> }</font>
/* set bit b5 in AC address register to lock palette and unblank display */
 (void)inportb(0x3DA);
 outportb(0x3C0, 0x20);</pre><center><p><hr class=z><table width=100% cellpadding=2 cellspacing=0 border=0><tr><td align=center><font size=-1><a href="http://www.google.com/">Google&nbsp;Home</a> - <a href="http://bos.asmhackers.net/ads/">Advertising&nbsp;Programs</a> - <a href="http://bos.asmhackers.net/services/">Business&nbsp;Solutions</a> - <a href=http://bos.asmhackers.net/about.html>About Google</a></font></table><br><font size=-1 class=p>&copy;2005 Google</font></center></body>
<!-- Mirrored from bos.asmhackers.net/docs/vga_without_bios/docs/groups.htm by HTTrack Website Copier/3.x [XR&CO'2013], Tue, 07 Oct 2014 11:24:46 GMT -->
</html>
